﻿using System.Data.Entity.ModelConfiguration;
using NCP.Recruiting.Domain.Aggregates.Resumes;

namespace NCP.Recruiting.Repository.SqlServer.UnitOfWork.Mapping {
    class ResumeEntityTypeConfiguration : EntityTypeConfiguration<Resume> {
        public ResumeEntityTypeConfiguration() {
            this.HasKey(r => r.Id);
            this.ToTable("ncp_resume");

            this.HasMany(r => r.Educations);
            this.HasMany(r => r.Works);
            this.HasMany(r => r.Skills);
            this.HasMany(r => r.Trainings);
            this.HasMany(r => r.Certifications);
        }
    }
}
